/* 自定义方法拓展库
*   李闯
*   2018/9/20
*/
var methods = {};
methods.toFloat = function(nums){
    var numstr = "'"+nums+"'";
    var numFloat = parseFloat(nums);
    var fixedNum = numstr.split(".")[1]?numstr.split(".")[1].length:0;
    console.log(fixedNum);
    return numFloat.toFixed(fixedNum);
}